package com.hsdev.caprace;

import org.andengine.engine.Engine;
import org.andengine.engine.camera.Camera;
import org.andengine.engine.camera.SmoothCamera;
import org.andengine.entity.scene.Scene;
import org.andengine.ui.activity.BaseGameActivity;

public class SceneManager {
	
	private BaseGameActivity activity;
	private Engine engine;
	private SmoothCamera camera;
	
	Scene splashScene, menuScene, gameScene;
	
	
	private AllScenes currentScene;
	
	public enum AllScenes {
		SPLASH,
		MENU,
		GAME,
	}
	
	public SceneManager(BaseGameActivity act, Engine eng, SmoothCamera cam) {
		this.activity = act;
		this.engine = eng;
		this.camera = cam;

	}
	public AllScenes getCurrentScene() {
		return currentScene;
	}
	
	public Scene createSplashScene(){
		splashScene = new SplashScene(engine);
		return splashScene;
	}
	
	public Scene createGameScene(){
		ResourceManager.getInstance().loadL1Fonts(engine);
		gameScene = new Level1Scene(engine, camera);
		return gameScene;
	}

	public void setCurrentScene(AllScenes currentScene) {
		this.currentScene = currentScene;
		switch (currentScene) {
		case SPLASH:
			
			break;
		
		case MENU:
			engine.setScene(menuScene);
			break;
			
		case GAME:
			engine.setScene(gameScene);
			break;

		default:
			break;
		}
	}

}
